<div id="register" title="Chào mừng bạn đến với Plus Mainichi">
	<a class="register_close">
    	<img class="close_popup" src="<?php echo base_url("gocart/themes/default/assets/images/close.png")?>">
    </a>
    <p class="register_title"> Chào mừng bạn đến với website Plus Mainichi </p>
    <div class="register_content">
        <div class="err"></div>
        <div class='info_user'>
            <p style="font-weight:bold"> Đăng ký thành viên Nhận ngay<br>  khuyến mãi 100.000 Đ</p>
            <p style="text-align:center"> <img style="margin-bottom:15px;margin-top:5px" src="<?php echo base_url("gocart/themes/default/assets/images/banner_1.png")?>"></p>
        </div>
        <div class="form_register">
            <form id="form_register" method="post" action="<?php echo site_url("popup/register")?>"  accept-charset ="utf-8">
                <input type="text" name="email" value="" id="bill_fullname" placeholder="Email" class="span12 form-control">
                <input type="text" name="phone" value="" id="bill_phone" placeholder="Số điện thoại" class="span3 form-control">
                <?php echo form_dropdown("country_zone_id",$result_zone,"","class='chosen'")?>
                <?php echo form_dropdown("category_product_id[]",$result_category_product,"","multiple class='chosen' data-placeholder ='Chọn sản phẩm quan tâm'")?>
                <button id="btn_regist" name="submit">Đăng ký</button>
            </form>
        </div>
    </div>
</div>
<style type="text/css">
.err{color:#F00;font-style:italic;text-align:center}
.info_user p{text-transform: uppercase;font-size: 15px;margin: 0px;text-align: center;}
.form_register input{margin-bottom:10px;}
.sellect{margin-bottom:10px}
.form_register button{margin-top:10px;margin-left:28%;background:#d39c2c;color:#FFF;border:1px solid #d39c2c;padding:5px 20px;}
.form_register button:hover{background:#94680e; }
</style>
<?php echo theme_js('chosen.js', true);?>
<?php echo theme_css('chosen.css', true);?>
<?php echo theme_js('popupoverlay.js', true);?>
<?php echo theme_css('popup.css', true);?>
<script language="javascript">
var $ajax = null;
$(document).ready(function(){
	$('#register').popup({autoopen:true, blur:false});
	$(".chosen").chosen();
	$("#btn_regist").click(function(){
		var postdata = $("#form_register").serializeArray();
		if($ajax != null)
			$ajax.abort();
		$ajax = $.ajax({
			url:"<?php echo site_url("popup/register")?>",
			data:postdata,
			type:"POST",
			success:function(result){
				result = $.parseJSON(result);
				if(result.err == 0)
					$(".register_content").html(result.mes);
				else
					$(".err").html(result.mes);
				return false;	
			}	
		});
		return false;
	});
});
</script>